from utils.Coverage import Coverage

def add(a, b):
    result = a + b  # Line 2
    if result < 0:   # Line 3
        result = 0   # Line 4
    return result    # Line 5
with Coverage() as cov:
    add(1, 2)    # 执行正常路径
    add(-3, -5)  # 执行if分支

print("覆盖的代码位置:", cov.coverage())